% V20210224 - 9.17.1 GW_CLOSE_INPUTLIST INCLUDE "GW.bas" % Create a page. p = GW_NEW_PAGE() % Prepare title bar string. Title$ = GW_ADD_BAR_TITLE$("Inputlist Example") % Add title to page. GW_ADD_TITLEBAR(p, Title$) % Add text. GW_ADD_TEXT(p, "This is an example of the INPUTLIST control.") % Define and add input control. ARRAY.LOAD os$[], "Android>OS1", "iOS>OS2", "Linux>OS3", "Mac OS>OS4", "Windows>OS5" inplist = GW_ADD_INPUTLIST(p, "Type an OS name...", os$[]) % Now show the page. GW_RENDER(p) DO % Wait for user action. r$ = GW_WAIT_ACTION$() % Example feedback. POPUP r$ % Inputlist events IF LEFT$(r$, 2) = "OS" % close list of pre-defined strings GW_CLOSE_INPUTLIST(inplist) % get what os # was selected sel_os = VAL(MID$(r$,3,1)) % display the os name in the input control GW_MODIFY (inplist, "text", LEFT$(os$[sel_os], -4)) % (we remove the last 4 characters ">OSn") ENDIF UNTIL r$ = "BACK" % End when BACK key is pressed. END "End of Inputlist example."